#pragma once

#include <qapplication.h>

class CWinApp;

class QMfcApp : public QApplication
{
public:
	static bool pluginInstance(Qt::HANDLE plugin = 0);

	static int run(CWinApp *mfcApp);
	static QApplication *instance(CWinApp *mfcApp);
	QMfcApp(CWinApp *mfcApp, int &argc, char **argv);

	~QMfcApp();

	bool winEventFilter(MSG *msg, long *result);

private:
	static char ** mfc_argv;
	static int mfc_argc;
	static CWinApp *mfc_app;

	int idleCount;
	bool doIdle;
};